package com.bestescortbedsystem.entity;

import java.io.Serializable;

/**
 * ses_user_sharing_message
 * @author 
 */
public class SesUserSharingMessage implements Serializable {
    /**
     * ID,主键PK
     */
    private Long messageid;

    /**
     * 消息标题
     */
    private String messagetitle;

    /**
     * 消息类型
     */
    private String messagetype;

    /**
     * 用户表ID(发送人)
     */
    private Long usersenderid;

    /**
     * 用户表ID(接收人)
     */
    private Long userreceivedid;

    /**
     * 发送方式:1.短信,2.微信(默认),3.邮件
     */
    private Integer messagesendtype;

    /**
     * 发送时间
     */
    private String messagetime;

    /**
     * 消息内容
     */
    private String messagecontent;
    /**
    * 外键：用户
    */
    private SesUser sesUser;

    public SesUser getSesUser() {
        return sesUser;
    }

    public void setSesUser(SesUser sesUser) {
        this.sesUser = sesUser;
    }

    private static final long serialVersionUID = 1L;

    public Long getMessageid() {
        return messageid;
    }

    public void setMessageid(Long messageid) {
        this.messageid = messageid;
    }

    public String getMessagetitle() {
        return messagetitle;
    }

    public void setMessagetitle(String messagetitle) {
        this.messagetitle = messagetitle;
    }

    public String getMessagetype() {
        return messagetype;
    }

    public void setMessagetype(String messagetype) {
        this.messagetype = messagetype;
    }

    public Long getUsersenderid() {
        return usersenderid;
    }

    public void setUsersenderid(Long usersenderid) {
        this.usersenderid = usersenderid;
    }

    public Long getUserreceivedid() {
        return userreceivedid;
    }

    public void setUserreceivedid(Long userreceivedid) {
        this.userreceivedid = userreceivedid;
    }

    public Integer getMessagesendtype() {
        return messagesendtype;
    }

    public void setMessagesendtype(Integer messagesendtype) {
        this.messagesendtype = messagesendtype;
    }

    public String getMessagetime() {
        return messagetime;
    }

    public void setMessagetime(String messagetime) {
        this.messagetime = messagetime;
    }

    public String getMessagecontent() {
        return messagecontent;
    }

    public void setMessagecontent(String messagecontent) {
        this.messagecontent = messagecontent;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SesUserSharingMessage other = (SesUserSharingMessage) that;
        return (this.getMessageid() == null ? other.getMessageid() == null : this.getMessageid().equals(other.getMessageid()))
            && (this.getMessagetitle() == null ? other.getMessagetitle() == null : this.getMessagetitle().equals(other.getMessagetitle()))
            && (this.getMessagetype() == null ? other.getMessagetype() == null : this.getMessagetype().equals(other.getMessagetype()))
            && (this.getUsersenderid() == null ? other.getUsersenderid() == null : this.getUsersenderid().equals(other.getUsersenderid()))
            && (this.getUserreceivedid() == null ? other.getUserreceivedid() == null : this.getUserreceivedid().equals(other.getUserreceivedid()))
            && (this.getMessagesendtype() == null ? other.getMessagesendtype() == null : this.getMessagesendtype().equals(other.getMessagesendtype()))
            && (this.getMessagetime() == null ? other.getMessagetime() == null : this.getMessagetime().equals(other.getMessagetime()))
                && (this.getSesUser() == null ? other.getSesUser() == null : this.getSesUser().equals(other.getSesUser()))
            && (this.getMessagecontent() == null ? other.getMessagecontent() == null : this.getMessagecontent().equals(other.getMessagecontent()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getMessageid() == null) ? 0 : getMessageid().hashCode());
        result = prime * result + ((getMessagetitle() == null) ? 0 : getMessagetitle().hashCode());
        result = prime * result + ((getMessagetype() == null) ? 0 : getMessagetype().hashCode());
        result = prime * result + ((getUsersenderid() == null) ? 0 : getUsersenderid().hashCode());
        result = prime * result + ((getUserreceivedid() == null) ? 0 : getUserreceivedid().hashCode());
        result = prime * result + ((getMessagesendtype() == null) ? 0 : getMessagesendtype().hashCode());
        result = prime * result + ((getMessagetime() == null) ? 0 : getMessagetime().hashCode());
        result = prime * result + ((getMessagecontent() == null) ? 0 : getMessagecontent().hashCode());
        result = prime * result + ((getSesUser() == null) ? 0 : getSesUser().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", messageid=").append(messageid);
        sb.append(", messagetitle=").append(messagetitle);
        sb.append(", messagetype=").append(messagetype);
        sb.append(", usersenderid=").append(usersenderid);
        sb.append(", userreceivedid=").append(userreceivedid);
        sb.append(", messagesendtype=").append(messagesendtype);
        sb.append(", messagetime=").append(messagetime);
        sb.append(", messagecontent=").append(messagecontent);
        sb.append(", sesUser=").append(sesUser);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}